import { isEmpty } from 'lodash'
export function getPath (path, extra = {}) {
  if (isEmpty(extra)) {
    return {
      path
    }
  }

  const { id, type, filterJson = {} } = extra

  return {
    path,
    query: {
      id,
      type,
      filterJson: JSON.stringify(filterJson)
    }
  }
}
